package com.wise.service.cms.content.category;

import com.wise.entities.content.ProductCategory;
import com.wise.framework.daomodel.DaoOne;
import com.wise.summer.v1.cms.content.category.GetCategoryById;
import org.springframework.stereotype.Service;
import org.summerframework.model.SummerService;
import org.summerframework.model.SummerServiceBean;

import static com.wise.model.content.ContentErrMsgs.Err_001000250007;

/**
 * @author shaoming
 * @date 2019-09-10
 */
@Service
@SummerService
public class GetCategoryByIdService implements SummerServiceBean<GetCategoryById> {

    @Override
    public void sum(GetCategoryById summer) {
        ProductCategory productCategory = DaoOne.s(ProductCategory.class, summer.getId(), Err_001000250007);

        summer.setSummerResult(productCategory);
    }
}
